package com.zh.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.zh.domain.Model.BaseEntity;
import com.zh.handler.JsonMapTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @TableName messages
 */
@TableName(value = "messages", autoResultMap = true)
@Data
@ApiModel(value = "消息表")
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class Message extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("消息id")
    private Integer id;
    @ApiModelProperty("发送人id")
    private Integer sendId;
    @ApiModelProperty("消息内容")
    private String content;
    @ApiModelProperty("消息参数,键值对")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Map<String, Object> params;
    @ApiModelProperty("通知类型0系统1用户")
    private Integer noticeType;
    @ApiModelProperty("消息类型0团队1项目2任务3需求4缺陷")
    private Integer type;
    @ApiModelProperty("消息状态0关闭1正常")
    private Integer status;
}